import React from 'react';

import {
    createAppContainer,
    createSwitchNavigator,
} from 'react-navigation';

import {
    createStackNavigator,
    CardStyleInterpolators,
    HeaderStyleInterpolators,
} from 'react-navigation-stack';

import Login from '../pages/Login/Login'
import IndexPage from '../pages/IndexPage'
import Person from '../pages/Person/Person'
import MyList from '../pages/MyList/MyList'
import DeptList from '../pages/DeptList/DeptList'
import WaitList from '../pages/WaitList/WaitList'
import CaseReport from '../pages/CaseReport/CaseReport'
import ApproveList from '../pages/ApproveList/ApproveList'
import DoneList from '../pages//DoneList/DoneList'
import Enterprise from "../pages/Enterprise/Enterprise";
import EnterpriseDetail from "../pages/Enterprise/EnterpriseDetail";
import Individual from "../pages/Individual/Individual";
import IndividualDetail from "../pages/Individual/IndividualDetail";
import Regulations from "../pages/Regulations/Regulations";
import EditPersonalInfoPage from "../pages/CaseReport/EditPersonalInfoPage";
import MakeCaseDocumentForm from "../pages/MakeCaseDocumentForm/MakeCaseDocumentForm";
import LookCasePdf from "../pages/MakeCaseDocumentForm/LookCasePdf";

import TextDetail from "../pages/TextDetail/TextDetail";
import EditEnterpriseInfoPage from "../pages/CaseReport/EditEnterpriseInfoPage";

const InitNavigator = createStackNavigator({
    Login: {
        screen: Login,
        navigationOptions: {
            header: () => null, // 隐藏头部
        },
    },
});
// 配置项目路由
const MainNavigator = createStackNavigator({
    IndexPage: {
        screen: IndexPage,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    Person: {
        screen: Person,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    DeptList: {
        screen: DeptList,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    MyList: {
        screen: MyList,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    WaitList: {
        screen: WaitList,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    CaseReport:{
        screen: CaseReport,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    ApproveList:{
        screen: ApproveList,
            navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    DoneList:{
        screen: DoneList,
            navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    Enterprise:{
        screen: Enterprise,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    EnterpriseDetail:{
        screen: EnterpriseDetail,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    Individual:{
        screen: Individual,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    IndividualDetail:{
        screen: IndividualDetail,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    Regulations:{
        screen: Regulations,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    TextDetail:{
        screen: TextDetail,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    EditPersonalInfoPage:{
        screen: EditPersonalInfoPage,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    EditEnterpriseInfoPage:{
        screen: EditEnterpriseInfoPage,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    MakeCaseDocumentForm:{
        screen: MakeCaseDocumentForm,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    },
    LookCasePdf:{
        screen: LookCasePdf,
        navigationOptions: {
            header: () => null, // 不显示页面的title
            headerRight: () => null,
        },
    }
});

export default createAppContainer(
    createSwitchNavigator(
        {
            Init: MainNavigator,
            Login: InitNavigator,
        },
        {
            navigationOptions: {
                header: (_) => null,
            },
        },
    ),
);
